package com.serg.mock.mochito.xpath;

import java.net.URL;
import java.net.URLConnection;

import org.apache.commons.io.IOUtils;

public class InetAddressTest
{
    public static void main(String[] args) throws Exception
    {
        URL url = new URL("http://www.wikipedia.org");

        URLConnection connection = url.openConnection();
        System.out.println(connection.getContentType());
        System.out.println(connection.getConnectTimeout());
        System.out.println(connection.getDoInput());
        System.out.println(connection.getDefaultUseCaches());
        System.out.println(connection.getDoOutput());
        System.out.println(connection.getHeaderFields());
        System.out.println(IOUtils.copy(connection.getInputStream(), System.out));

    }
}
